﻿<UserControl x:Class="Lessons.Lesson6.Example"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:pivot="clr-namespace:ExtendedPivotViewer;assembly=ExtendedPivotViewer" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>
        <Style TargetType="pivot:ExtendedPivotViewer">
            <Setter Property="Margin" Value="5"/>
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect Opacity="0.3" ShadowDepth="3" BlurRadius="3"/>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Name="InfoPanelStyle" TargetType="Border">
            <Setter Property="Margin" Value="5"/>
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect Opacity="0.3" ShadowDepth="3" BlurRadius="3"/>
                </Setter.Value>
            </Setter>
            <Setter Property="Width" Value="250"/>
            <Setter Property="Background" Value="#FFf5f7f9"/>
            <Setter Property="BorderBrush" Value="#FFd3d4d4"/>
            <Setter Property="BorderThickness" Value="1"/>
        </Style>
        <Style x:Name="InfoPanelContainerStyle" TargetType="StackPanel">
            <Setter Property="Margin" Value="5"/>
        </Style>
        <Style x:Name="InfoPanelSectionStyle" TargetType="StackPanel">
            <Setter Property="Margin" Value="0,0,0,20"/>
        </Style>
        <Style x:Name="InfoScrollStyle" TargetType="ScrollViewer">
            <Setter Property="BorderThickness" Value="0"/>
        </Style>

    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="260"/>
        </Grid.ColumnDefinitions>
        <pivot:ExtendedPivotViewer x:Name="pvLesson6" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CollectionBackground="{Binding SelectedBackgroundBrush}"
                                   InfoPaneBackground="{Binding InfoPaneBackground}"
                                   ShowInfoPane="{Binding ElementName=cbShowInfo, Path=IsChecked, Mode=TwoWay}"
                                   ShowFilterPane="{Binding ElementName=cbShowFilter, Path=IsChecked, Mode=TwoWay}"
                                   FilterPaneBackground="{Binding FilterPaneBackground}">

        </pivot:ExtendedPivotViewer>

        <Border Grid.Column="1" Style="{StaticResource InfoPanelStyle}">
            <ScrollViewer VerticalScrollBarVisibility="Auto">
                <StackPanel Style="{StaticResource InfoPanelContainerStyle}">

                    <StackPanel Style="{StaticResource InfoPanelSectionStyle}">
                        <TextBlock Text="Set All Filter Fonts"/>
                        <ComboBox x:Name="cbFont" ItemsSource="{Binding Fonts}" SelectedItem="{Binding SelectedFontFamily, Mode=TwoWay}"/>
                    </StackPanel>

                    <StackPanel Style="{StaticResource InfoPanelSectionStyle}">
                        <TextBlock Text="Set Category Fonts"/>
                        <ComboBox x:Name="cbCatFont" ItemsSource="{Binding Fonts}" SelectedItem="{Binding SelectedCatFont, Mode=TwoWay}"/>
                    </StackPanel>

                    <StackPanel Style="{StaticResource InfoPanelSectionStyle}">
                        <TextBlock Text="Set Category Fonts"/>
                        <ComboBox x:Name="cbSortFont" ItemsSource="{Binding Fonts}" SelectedItem="{Binding SelectedSortFont, Mode=TwoWay}"/>
                    </StackPanel>

                    <StackPanel Style="{StaticResource InfoPanelSectionStyle}">
                        <TextBlock Text="Set Item Fonts"/>
                        <ComboBox x:Name="cbItemFont" ItemsSource="{Binding Fonts}" SelectedItem="{Binding SelectedItemFont, Mode=TwoWay}"/>
                    </StackPanel>

                </StackPanel>

            </ScrollViewer>
        </Border>
    </Grid>

</UserControl>
